package com.crm.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author crm
 * @since 2020-06-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Track extends Model<Track> {

    private static final long serialVersionUID = 1L;

    /**
     * 跟踪id
     */
    @TableId(value = "tid", type = IdType.AUTO)
    private Integer tid;

    /**
     * 学生id
     */
    private Integer stuId;

    /**
     * 跟踪时间
     */
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date trackTime;

    /**
     * 回访情况
     */
    private String reviewSituation;

    /**
     * 回访方式
     */
    private String trackMode;

    /**
     * 内容
     */
    private String content;

    /**
     * 下次跟踪时间
     */
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date nextTrackTime;

    private Integer int0;

    private String string0;


    @Override
    protected Serializable pkVal() {
        return this.tid;
    }


    @TableField(exist = false) // 该列不与数据库匹配
    private Student student;// 多对一
    @TableField(exist = false) // 该列不与数据库匹配
    private User user;// 多对一

}
